import requests


class LoginApi(object):
    def login(self, req_body):
        resp = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                             json=req_body)
        return resp


# 自测

if __name__ == '__main__':
    ihrm = LoginApi()
    resp = ihrm.login({"mobile": "13800000002", "password": "123456"})
    print(resp.json())
